class Rapameter:
  idf = ""
  name = ""
  value = 0;
  initValue = 0;
  effFrq = False;
  effAmp = True;
  delta = 1;

  def __init__(self,i,n,iv,ef,ea,d):
    self.idf = i;
    self.name = n;
    self.iv = iv;
    self.value = iv;
    self.effFrq = ef;
    self.effAmp = ea;
    self.delta = d;

  def __str__(self):
    return self.idf +" | "+self.name + " | " + str(self.value) + " | " + str(self.delta);
    

  def get_value(self):
    return self.value;

  def get_name(self):
    return self.name;

  def increase(self):
    #print self.name, " ", str(id(self))
    self.value = self.value + self.delta;


class RapameterArray:
  ra_array = None

  def __init__(self):
    self.ra_array = dict();

  def append(self,rapam):
    self.ra_array[rapam.idf] = rapam;

  def __getitem__(self, s):
    return self.ra_array[s];

  def getKeys(self):
    return self.ra_array.keys();

  def printOut(self):
    for ra in self.ra_array:
      print self.ra_array[ra]

  def __str__(self):
    s = 'RapameterArray ' + str(id(self)) + '\n'
    #s = s+'ra_array'+ str(id(self.ra_array)) + '\n'
    for k in self.ra_array.keys():
      s = s + str(self.ra_array[k]) + '\n';
    return s

  def get_fname(self):
    s = '';
    for k in self.ra_array.keys():
      s = s + str(self.ra_array[k].idf) + '=' + str(self.ra_array[k].get_value()) + ' ';
    return s

  def get_values_list():
    return [ra_array[k] for k in self.ra_array.keys()]
    
   
